<template>
  <el-row>
    <el-col :span="4">
      <span>{{ $store.state.b.userInfo.uname }},欢迎光临。</span>
    </el-col>
    <el-col :span="16">XXXX管理系统</el-col>
    <el-col :span="4">
      <el-button type="text" icon="el-icon-setting" @click="logout"
        >退出</el-button
      >
    </el-col>
  </el-row>
</template>

<script>
export default {
  methods: {
    logout() {
      this.$store.dispatch("loginAc", {
        isLogin: "0",
        token: "",
        userInfo: {},
      });
      sessionStorage.isLogin = "0";
      sessionStorage.token = "";
      sessionStorage.userInfo = "";
      this.$router.push("/");
    },
  },
};
</script>

<style>
</style>